package top.sdwu_top.kbase.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import top.sdwu_top.kbase.common.model.Wrapper;
import top.sdwu_top.kbase.entity.KbaseSysDict;
import top.sdwu_top.kbase.service.IKbaseSysDictService;

import java.util.List;

/**
 * <p>
 * 字典表 前端控制器
 * </p>
 *
 * @author zhipeng.duan@nvr-china.com
 * @since 2020-02-20
 */
@RestController
@RequestMapping("api/sys-dict")
public class KbaseSysDictController {

    @Autowired
    IKbaseSysDictService sysDictService;

    @GetMapping("type/{type}")
    public Wrapper<List<KbaseSysDict>> getListByType(@PathVariable("type") String type) {
        return Wrapper.ok(sysDictService.list(type));
    }

}

